const calculatePercentage = (num1: number, num2: number, num3: number) => {
    const total = num1 + num2 + num3;
    if (total != 0) {
        const percentage1 = (num1 / total) * 100;
        const percentage2 = (num2 / total) * 100;
        const percentage3 = (num3 / total) * 100;

        return {
            num1: percentage1.toFixed(0) + '%',
            num2: percentage2.toFixed(0) + '%',
            num3: percentage3.toFixed(0) + '%'
        };
    } else {
        return {
            num1: 0 + '%',
            num2: 0 + '%',
            num3: 0 + '%'
        };
    }

}
export default calculatePercentage